#ifndef __QUEUE_H__
#define __QUEUE_H__ 1

#include <pthread.h>

typedef struct _queueNode {
    int fileDescribe;
    struct _queueNode *pNext;
} node_t;

typedef struct _queue {
    int size;
    node_t *pHead;
    node_t *pTail;
} queue_t;

int queueInit(queue_t **ppQueue);
int queueDestory(queue_t *pQueue);

int queuePush(queue_t *pQueue, int fileDescribe);
int queuePop(queue_t *pQueue, int *pFileDescribe);

#endif